import service from "@/utils/request"

import LoginWork from "@/utils/LoginWork"

// 扣款明细查询
export const CheckTheDeductionDetails = (parms:any) => {
    return service.post<any,any>(`/salaryFile/SubsidyDeductionQuery`,parms)
}

// 补贴扣款查询
export const SubsidyDeductionInquiry = () => {
    return service.get<any,any>(`/salaryFile/DeductionDefinition?flag=${1}`)
}

// 员工查询
export const ElpoyleList = () => {
    return service.get<any,any>(`/salaryFile/getEmployeeList`)
}

// 结算检核
export const CheckOperation = (parms:any,choose:number) => {
    return LoginWork.put<any,any>(`/salaryFile/InspectionWork/${choose}`,parms)
}

// 费用结算
export const disbursementAndSettlement = () => {
    return service.get<any,any>(`/mtlCosts/costTempQuery`)
}

// 修改
export const detilList = (slipNo:string) => {
    return LoginWork.get<any,any>(`/salaryFile/PcCostDetail2Update?id=${slipNo}`)
}

// 增加
export const addList = (parms:any) => {
    return LoginWork.post<any,any>(`/salaryFile/PcCostDetail2Add`,parms)
}

// 补贴扣款查询
export const SubsidyDeductionInquiry2 = () => {
    return service.get<any,any>(`/salaryFile/DeductionDefinition?flag=${2}`)
}

// 扣款删除
export const deleteUser = (parms:any) => {
    return LoginWork.post<any,any>(`/salaryFile/pcCostTypeDel`,parms)
}

// 扣款新增
export const DeductionIncreas = (parms:any) => {
    return LoginWork.post<any,any>(`/salaryFile/pcCostTypeAdd`,parms)
}

// 删除
export const deleteList = (parms:any) => {
    return LoginWork.post<any,any>(`/salaryFile/PcCostDetail2Del`,parms)
}

// 修改结算方式
export const ModificationOfSettlement = (choose:number,list:any) => {
    return LoginWork.put<any,any>(`/salaryFile/PcCostDetail2Update2/${choose}`,list)
}

// 导入
export const toLead = (file:any,addListParms:any) => {
    return LoginWork.post<any,any>(`/salaryFile/PcCostDetail2Import?deptNo=${addListParms.deptNo}&typeName=${addListParms.typeName}&typeNo=${addListParms.typeNo}&accountName=${addListParms.accountName}&&sendNo=${addListParms.sendNo}`,file)
}